package link.cocoon.blog.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import link.cocoon.common.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author Cocoon
 * @since 2020-03-31
 */
@Data
@EqualsAndHashCode( callSuper = true )
@Accessors( chain = true )
@TableName( "blog_article" )
@ApiModel( value = "Article对象", description = "博文" )
public class
Article extends BaseEntity {

  @NotBlank( message = "标题不允许为空" )
  @ApiModelProperty( value = "标题" )
  private String title;

  @ApiModelProperty( value = "副标题" )
  private String subtitle;

  @ApiModelProperty( value = "摘要")
  private String summary;

  @NotBlank( message = "内容不允许为空" )
  @ApiModelProperty( value = "内容" )
  private String content;

  @NotNull( message = "分类不允许为空" )
  @ApiModelProperty( value = "分类ID" )
  private Long categoryId;

  @ApiModelProperty( value = "创建人ID" )
  private Long createBy;


}
